﻿<%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default2.aspx.vb" Inherits="Default2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>

  
    <link href="Default.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
        <asp:Button ID="Button1" runat="server" Text="Button" />
    
        <asp:Button ID="Button3" runat="server" Text="Default.aspx" />
    
    </div>
    <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
        DeleteCommand="DELETE FROM [Menu] WHERE [ProgramID] = @ProgramID" 
        InsertCommand="INSERT INTO [Menu] ([ProgramID], [RootName], [Name], [NeedControl], [URL], [GroupID], [ModiDate], [ModiUID], [CrtDate], [CrtUID]) VALUES (@ProgramID, @RootName, @Name, @NeedControl, @URL, @GroupID, @ModiDate, @ModiUID, @CrtDate, @CrtUID)" 
        SelectCommand="SELECT [ProgramID], [RootName], [Name], [NeedControl], [URL], [GroupID], [ModiDate], [ModiUID], [CrtDate], [CrtUID] FROM [Menu]" 
        
        UpdateCommand="UPDATE [Menu] SET [RootName] = @RootName, [Name] = @Name, [NeedControl] = @NeedControl, [URL] = @URL, [GroupID] = @GroupID, [ModiDate] = @ModiDate, [ModiUID] = @ModiUID, [CrtDate] = @CrtDate, [CrtUID] = @CrtUID WHERE [ProgramID] = @ProgramID">
        <DeleteParameters>
            <asp:Parameter Name="ProgramID" Type="Int32" />
        </DeleteParameters>
        <UpdateParameters>
            <asp:Parameter Name="RootName" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="NeedControl" Type="Boolean" />
            <asp:Parameter Name="URL" Type="String" />
            <asp:Parameter Name="GroupID" Type="String" />
            <asp:Parameter Name="ModiDate" Type="DateTime" />
            <asp:Parameter Name="ModiUID" Type="String" />
            <asp:Parameter Name="CrtDate" Type="DateTime" />
            <asp:Parameter Name="CrtUID" Type="String" />
            <asp:Parameter Name="ProgramID" Type="Int32" />
        </UpdateParameters>
        <InsertParameters>
            <asp:Parameter Name="ProgramID" Type="Int32" />
            <asp:Parameter Name="RootName" Type="String" />
            <asp:Parameter Name="Name" Type="String" />
            <asp:Parameter Name="NeedControl" Type="Boolean" />
            <asp:Parameter Name="URL" Type="String" />
            <asp:Parameter Name="GroupID" Type="String" />
            <asp:Parameter Name="ModiDate" Type="DateTime" />
            <asp:Parameter Name="ModiUID" Type="String" />
            <asp:Parameter Name="CrtDate" Type="DateTime" />
            <asp:Parameter Name="CrtUID" Type="String" />
        </InsertParameters>
    </asp:SqlDataSource>
    <asp:Panel ID="Panel1" runat="server">
    </asp:Panel>
    <TServerControl:TGridView  ID="GridView1" runat="server" AutoGenerateColumns="False" 
        DataKeyNames="ProgramID" DataSourceID="SqlDataSource1" 
        AllowHoverEffect="True" AllowHoverSelect="True" AllowPaging="True" PageSize="2" 
        ShowFooterWhenEmpty="True" ShowHeaderWhenEmpty="False" TotalRowCount="0" 
        SkinID="pager" AutoGenerateDeleteButton="True" AutoGenerateEditButton="True" 
        AutoGenerateSelectButton="True" Visible="False"  >
     
        <PagerStyle />
     
        <Columns>
            <asp:BoundField DataField="ProgramID" HeaderText="ProgramID" ReadOnly="True" 
                SortExpression="ProgramID" />
            <asp:BoundField DataField="RootName" HeaderText="RootName" 
                SortExpression="RootName" />
            <asp:BoundField DataField="Name" HeaderText="Name" SortExpression="Name" />
            <asp:CheckBoxField DataField="NeedControl" HeaderText="NeedControl" 
                SortExpression="NeedControl" />
            <asp:BoundField DataField="URL" HeaderText="URL" SortExpression="URL" />
            <asp:BoundField DataField="GroupID" HeaderText="GroupID" 
                SortExpression="GroupID" />
            <asp:BoundField DataField="ModiDate" HeaderText="ModiDate" 
                SortExpression="ModiDate" />
            <asp:BoundField DataField="ModiUID" HeaderText="ModiUID" 
                SortExpression="ModiUID" />
            <asp:BoundField DataField="CrtDate" HeaderText="CrtDate" 
                SortExpression="CrtDate" />
            <asp:BoundField DataField="CrtUID" HeaderText="CrtUID" 
                SortExpression="CrtUID" />
        </Columns>
    </TServerControl:TGridView>
    <asp:PlaceHolder ID="PlaceHolder1" runat="server"></asp:PlaceHolder>
    </form>
</body>
</html>
